package me.xiaoyan.cloud.controller;

import me.xiaoyan.cloud.pojo.UserInfo;
import me.xiaoyan.cloud.repository.UserInfoRepository;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class SignupController {
    @Resource
    private UserInfoRepository userInfoRepository;
    @PostMapping("/signup")
    public UserInfo create(@RequestBody UserInfo userInfo){
        return userInfoRepository.save(userInfo);
    }
}
